#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class SchoolData;
class QTreeWidgetItem;
class QTableWidgetItem;
class MainWindow : public QMainWindow {
    Q_OBJECT

public:
    MainWindow(QWidget* parent = nullptr);
    ~MainWindow();

private slots:
    void treeDoubleClicked(QTreeWidgetItem*);
    void RightClicked(const QPoint& pos);
    void addStudent();
    void delStudent();
    void addClass();
    void delClass();
    void addSchool();
    void delSchool();
    int searchSchool(QTreeWidgetItem* item);
    int searchClassInSchool(QTreeWidgetItem* item, int schoolIndex);
    bool searchStudent(QString);

private:
    Ui::MainWindow* ui;
    QList<SchoolData*> m_schoolList;
};
#endif // MAINWINDOW_H
